import PageTools from './PageTools'
import UploadExcel from './UploadExcel'
import UploadImg from './UploadImg'

// 1. 批量注册全局组件, 定义一个数组
const components = [PageTools, UploadExcel, UploadImg]
// 注册全局插件
export default {
  install (Vue) {
    // Vue.component('PageTools', PageTools)

    // 2.  批量注册全局组件遍历数组
    components.forEach(cp => {
      // name是一个字符串
      Vue.component(cp.name, cp)
    })
  }
}
